var express = require("express");
var router = express.Router();
const {
  getImgData,
  goUrlGetD,
  downLoadImg,
} = require("../utils/getCodeString");

/* GET home page. */
router.get("/getimg", async function (req, res, next) {
  for (let i = 9, len = 100; i < len; i++) {
    await getImgData(i)
      .then(
        (res) => goUrlGetD(res),
        (e) => console.log("访问页面,创建跳转Url数组失败了呢", e)
      )
      .catch((e) => {
        console.log("失败了呢", e);
      });
  }

  res.status(200).send({
    status: "success",
    statusCode: "res.statusCode",
    message: "zlm",
  });
});

module.exports = router;
